'use strict';
const BaseService = require('./base');

class RoleUserService extends BaseService {
  constructor(ctx) {
    super(ctx);
    this.entry = 'role_user';
  }
  async destroy(role_id) {
    const { app } = this;
    const { affectedRows } = await app.mysql.delete(this.entry, role_id);
    if (affectedRows) {
      return '删除成功';
    }
    throw '删除失败';
  }
}

module.exports = RoleUserService;
